/*
 * Copyright (c) 2014 - 2017. Company.Domain Co.Ltd. All rights reserved.
 */

package cn.com.dhc.danlu.activity.delivery;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import cn.com.dhc.danlu.R;
import cn.com.dhc.danlu.activity.BaseActivity;

/**
 * author: 刘立琦(<a href="mailto:liuliqi@danlu.com">liuliqi@danlu.com</a>)<br/>
 * version: 1.0.0<br/>
 * since: 2017-01-17 11:02<br/>
 *
 * <p>
 * 提交订单失败
 * </p>
 */
public class OrderReferFailedActivity extends BaseActivity implements OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_refer_orders_failed);
        init();
    }

    @Override
    protected String getActivityTitle() {
        return null;
    }

    private void init() {
        // 完成
        TextView tvComplete = (TextView) findViewById(R.id.tv_complete);
        // 订单提交失败信息
        TextView tvErrorMsg = (TextView) findViewById(R.id.tv_error_msg);
        Intent intent = getIntent();
        String errorMsgs = intent.getStringExtra("ERRORMSG");
        if (errorMsgs != null) {
            tvErrorMsg.setText(errorMsgs);
        }
        tvComplete.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_complete:
                this.finish();
                break;

            default:
                break;
        }
    }
}